#ifndef LOGINDATAWIDGET_H
#define LOGINDATAWIDGET_H

#include <QWidget>


QT_BEGIN_NAMESPACE
namespace Ui { class LoginDataWidget; }
QT_END_NAMESPACE

class LoginDataWidget final : public QWidget
{
    Q_OBJECT

Q_SIGNALS:
    void StartServer(bool checked);
public:
    explicit LoginDataWidget(QWidget *parent = nullptr);
    ~LoginDataWidget() override;

    /*设置网络列表 */
    void SetNetworkList(const QStringList& list) const;

    /* 获取当前网卡序列号 */
    [[nodiscard]] int GetCurentNetworkIndex() const;

private:
    void OnConnect();

private Q_SLOTS:
    void OnStartClick(bool checked);

    void OnClearClick() const;

public Q_SLOTS:
    void AddLog(const QString& msg) const;

private:
    Ui::LoginDataWidget *ui;
};


#endif //LOGINDATAWIDGET_H
